// pages/payment/xq/xq.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
http:getApp().globalData.map
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
	  wx.getStorage({
		  key:'uid',
		  success: (e) => {
		  	this.setData({
				uid:e.data.uid
			})
		  }
	  })
	wx.request({
		url:getApp().globalData.http+'action=returnDetail&thid='+options.id,
		success: (e) => {
			console.log(e)
			this.setData({
				thid:options.id,
				data:e.data.data
			})
		}
	})
  },
  nonec(){
	  wx.showModal({
		  title:'确定要撤销申请吗？',
		  success: (res) => {
			  console.log(res)
		  	if (res.confirm) {
		  		wx.request({
						// action=deleteReturnOrder, thid=退换货ID, uid=用户ID
					url:getApp().globalData.http+'action=deleteReturnOrder&uid='+this.data.uid+'&thid='+this.data.thid,
					success: (e) => {
						console.log(e)
						wx.showToast({
							title:e.data.msg,
							icon:'none',
							success: () => {
								wx.navigateBack({delta:2})
							}
						})
					}
				})
		  	}
		  }
	  })
  }
})